var Animal={
    createNew:function(){
        var animal={};
        animal.sleep=function(){
            console.log('睡觉觉');
        }
        return animal;
    }
}
var Cat={
    createNew:function(){
var cat=Animal.createNew();
cat.name='大猫';
var sound='喵喵喵';//私有
cat.makesound=function(){
    console.log('喵');
}
return cat;
    }
}
var tom=Cat.createNew('Tom');
console.log(tom.name);//public private protect static
tom.makesound();
console.log(tom.sound);
tom.sleep();